<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <!-- 音频 -->
  <audio preload="auto" id="musicDui">
    <source src="audio/dui.mp3" type="audio/mp3">
    <source src="audio/dui.ogg" type="audio/ogg">
  </audio>
  <audio preload="auto" id="musicCuo">
    <source src="audio/aou.mp3" type="audio/mp3">
    <source src="audio/aou.ogg" type="audio/ogg">
  </audio>

  <button type="button" id="btn-dui" class="btn btn-large btn-block btn-default">播放对</button>
  <button type="button" id="btn-cuo" class="btn btn-large btn-block btn-default">播放错</button>

</body>
<script>
  var btndui = document.getElementById("btn-dui");
  var btncuo = document.getElementById("btn-cuo");
  var musicDui = document.getElementById("musicDui");
  var musicCuo = document.getElementById("musicCuo");

  btndui.onclick = function () {
    musicDui.play();
  }
  btncuo.onclick = function () {
    musicCuo.play();
  }
</script>

</html>